clear all
set more off
cap log close

****************************************************************************
* This do-file extract data from the Read-only LAD files
*	- age, sex, family type and business income
* 
* Creates the following Stata files:
*	- demographic_yyyy.dta.dta
* 	- demographic_8299.dta (appended files)
*   - demographic_0016.dta (appended files)
* 
****************************************************************************

do "H:\Lavecchia_7086\to-transfer-jan-2022\RESTAT_Replication_Programs\0_Set_Directories.do"

cap log using "$dir_log\1c_Extract_Demographics_permanent.log", replace


* Step 1: load the data from LAD read-only files

use "G:\LAD_All_years\LAD_All_year_V5\Data\STATA\STATA\reg2016.dta"
*use "G:\LAD\LAD_DAL_Allcycle_v3\data\data\Stata\reg2016.dta"
keep lin__i sxco_i yob__i

save "$dir_data\demographic_permanent.dta", replace
